home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SYS
/
BOOTUP
/
!Boot
/
Code
< prev
next >
Wrap
Text File
|
1991-07-18
|
2KB
|
99 lines
REM >!Runimage
ON ERROR SYS "Wimp_ReportError",FNerrblk(ERR,REPORT$),1,"Boot":SYS "Wimp_CloseDown":END
DIM name &100, block &100
SYS "Wimp_Initialise",200,&4B534154,"Boot"
SYS "Wimp_Poll",0,block
*CLOSE
REM close all open Obey files.
REM get screen parameters
block!0 = 4
block!4 = 5
block!8 = 11
block!12= 12
block!16= -1
SYS"OS_ReadVduVariables",block,block+20
dx%=1<<(block!20)
dy%=1<<(block!24)
scrx1%=(block!28+1)*dx%
scry1%=(block!32+1)*dy%
*IconSprites <Boot$Path>.!Sprites
DIM mainblock 400
maxws=500
DIM ws maxws
wsend=ws+maxws
SYS "Wimp_OpenTemplate",,"<Boot$Path>.Templates"
SYS "Wimp_LoadTemplate",,mainblock,ws,wsend,-1,"Startup",0 TO ,,ws
SYS "Wimp_CreateWindow",,mainblock TO mainwindow
SYS "Wimp_CloseTemplate"
!block=mainwindow
block!4=!mainblock
block!8=mainblock!4
block!12=mainblock!8
block!16=mainblock!12
block!20=(scrx1%-400)/2
block!24=(scry1%-200)/2
block!28=-1
SYS "Wimp_OpenWindow",,block
PROCpoll
*Dir <Boot$Path>.Boot
seq=0
number=0
length=0:REPEAT
*Dir <Boot$Path>.Boot
SYS "OS_GBPB",8,,name,1,seq TO ,,,number, seq
IF number=0 THEN
name?(1+?name)=13
name$=$(name+1)
path$="<Boot$Path>.Boot."+name$+".!Boot"
OSCLI "Wimptask "+path$
PROCpoll
ENDIF
UNTIL number
*Dir <Boot$Path>.Run
seq=0
number=0
length=0:REPEAT
*Dir <Boot$Path>.Run
SYS "OS_GBPB",8,,name,1,seq TO ,,,number, seq
IF number=0 THEN
name?(1+?name)=13
name$=$(name+1)
path$="<Boot$Path>.Run."+name$
OSCLI "Wimptask "+path$
PROCpoll
ENDIF
UNTIL number
!block=mainwindow
SYS "Wimp_CloseWindow",,block
SYS "Wimp_CloseDown"
END
DEFFNerrblk(err%,report$)
!errblock=err%
$(errblock+4)=report$+" at line "+STR$ERL
errblock?(4+LEN$(errblock+4))=0
=errblock
DEFPROCpoll
REPEAT
SYS "Wimp_Poll",0,block TO reason
CASE reason OF
WHEN 2 :
!block=mainwindow
block!4=!mainblock
block!8=mainblock!4
block!12=mainblock!8
block!16=mainblock!12
block!20=(scrx1%-400)/2
block!24=(scry1%-200)/2
block!28=-1
SYS "Wimp_OpenWindow",,block
ENDCASE
UNTIL reason=0
ENDPROC